package com.wl4837;

public class App
{
    public static void main( String[] args )
    {
        WeatherData weatherData = new WeatherData();
        Observer currentDisplay = new CurrentConditionsDisplay();

        weatherData.registerObserver(currentDisplay);
        weatherData.setMeasurements(25, 65, 1013); // 触发通知
        weatherData.removeObserver(currentDisplay); // 移除观察者
        weatherData.setMeasurements(28, 70, 1012); // 无通知
    }
}
